Optimal. Leaf size=98 \[ \frac{x^2 \sin ^2\left (a+b \log \left (c x^n\right )\right )}{2 \left (b^2 n^2+1\right )}-\frac{b n x^2 \sin \left (a+b \log \left (c x^n\right )\right ) \cos \left (a+b \log \left (c x^n\right )\right )}{2 \left (b^2 n^2+1\right )}+\frac{b^2 n^2 x^2}{4 \left (b^2 n^2+1\right )} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0222139, antiderivative size = 98, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 2, integrand size = 15, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.133, Rules used = {4487, 30} \[ \frac{x^2 \sin ^2\left (a+b \log \left (c x^n\right )\right )}{2 \left (b^2 n^2+1\right )}-\frac{b n x^2 \sin \left (a+b \log \left (c x^n\right )\right ) \cos \left (a+b \log \left (c x^n\right )\right )}{2 \left (b^2 n^2+1\right )}+\frac{b^2 n^2 x^2}{4 \left (b^2 n^2+1\right )} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 4487
Rule 30
Rubi steps
\begin{align*} \int x \sin ^2\left (a+b \log \left (c x^n\right )\right ) \, dx &=-\frac{b n x^2 \cos \left (a+b \log \left (c x^n\right )\right ) \sin \left (a+b \log \left (c x^n\right )\right )}{2 \left (1+b^2 n^2\right )}+\frac{x^2 \sin ^2\left (a+b \log \left (c x^n\right )\right )}{2 \left (1+b^2 n^2\right )}+\frac{\left (b^2 n^2\right ) \int x \, dx}{2 \left (1+b^2 n^2\right )}\\ &=\frac{b^2 n^2 x^2}{4 \left (1+b^2 n^2\right )}-\frac{b n x^2 \cos \left (a+b \log \left (c x^n\right )\right ) \sin \left (a+b \log \left (c x^n\right )\right )}{2 \left (1+b^2 n^2\right )}+\frac{x^2 \sin ^2\left (a+b \log \left (c x^n\right )\right )}{2 \left (1+b^2 n^2\right )}\\ \end{align*}
Mathematica [A] time = 0.109502, size = 57, normalized size = 0.58 \[ \frac{x^2 \left (-b n \sin \left (2 \left (a+b \log \left (c x^n\right )\right )\right )-\cos \left (2 \left (a+b \log \left (c x^n\right )\right )\right )+b^2 n^2+1\right )}{4 b^2 n^2+4} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [F] time = 0.069, size = 0, normalized size = 0. \begin{align*} \int x \left ( \sin \left ( a+b\ln \left ( c{x}^{n} \right ) \right ) \right ) ^{2}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] time = 1.16108, size = 381, normalized size = 3.89 \begin{align*} -\frac{{\left ({\left (b \cos \left (2 \, b \log \left (c\right )\right ) \sin \left (4 \, b \log \left (c\right )\right ) - b \cos \left (4 \, b \log \left (c\right )\right ) \sin \left (2 \, b \log \left (c\right )\right ) + b \sin \left (2 \, b \log \left (c\right )\right )\right )} n + \cos \left (4 \, b \log \left (c\right )\right ) \cos \left (2 \, b \log \left (c\right )\right ) + \sin \left (4 \, b \log \left (c\right )\right ) \sin \left (2 \, b \log \left (c\right )\right ) + \cos \left (2 \, b \log \left (c\right )\right )\right )} x^{2} \cos \left (2 \, b \log \left (x^{n}\right ) + 2 \, a\right ) +{\left ({\left (b \cos \left (4 \, b \log \left (c\right )\right ) \cos \left (2 \, b \log \left (c\right )\right ) + b \sin \left (4 \, b \log \left (c\right )\right ) \sin \left (2 \, b \log \left (c\right )\right ) + b \cos \left (2 \, b \log \left (c\right )\right )\right )} n - \cos \left (2 \, b \log \left (c\right )\right ) \sin \left (4 \, b \log \left (c\right )\right ) + \cos \left (4 \, b \log \left (c\right )\right ) \sin \left (2 \, b \log \left (c\right )\right ) - \sin \left (2 \, b \log \left (c\right )\right )\right )} x^{2} \sin \left (2 \, b \log \left (x^{n}\right ) + 2 \, a\right ) - 2 \,{\left ({\left (b^{2} \cos \left (2 \, b \log \left (c\right )\right )^{2} + b^{2} \sin \left (2 \, b \log \left (c\right )\right )^{2}\right )} n^{2} + \cos \left (2 \, b \log \left (c\right )\right )^{2} + \sin \left (2 \, b \log \left (c\right )\right )^{2}\right )} x^{2}}{8 \,{\left ({\left (b^{2} \cos \left (2 \, b \log \left (c\right )\right )^{2} + b^{2} \sin \left (2 \, b \log \left (c\right )\right )^{2}\right )} n^{2} + \cos \left (2 \, b \log \left (c\right )\right )^{2} + \sin \left (2 \, b \log \left (c\right )\right )^{2}\right )}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 0.489977, size = 209, normalized size = 2.13 \begin{align*} -\frac{2 \, b n x^{2} \cos \left (b n \log \left (x\right ) + b \log \left (c\right ) + a\right ) \sin \left (b n \log \left (x\right ) + b \log \left (c\right ) + a\right ) + 2 \, x^{2} \cos \left (b n \log \left (x\right ) + b \log \left (c\right ) + a\right )^{2} -{\left (b^{2} n^{2} + 2\right )} x^{2}}{4 \,{\left (b^{2} n^{2} + 1\right )}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] time = 1.44718, size = 1107, normalized size = 11.3 \begin{align*} \text{result too large to display} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]